home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
T-TPUG Old Monthly Disks
/
(c)t8.d64
/
life 2.c
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
3KB
|
64 lines
10 REM LIFE
11 REM
12 REM FRANK LINDSEY
13 REM BOWLING GREEN
14 REM KENTUCKY, USA
15 REM (502)781-3117
16 REM
17 REM LET'S HEAR IT FOR FREE SOFTWARE!
18 REM
19 REM LET'S ALSO HEAR IT FOR MAKING A
20 REM BUCK. WATCH FOR MY OTHER COMMER-
21 REM CIALLY AVAILABLE PROGRAMS.
22 REM
1000 PRINT"[147][142]":POKE53280,6:POKE53281,6
1010 PRINTSPC(18)"LIFE":PRINT"BY JOHN H. CONWAY"
1020 PRINT"C-64 VERSION BY FRANK LINDSEY"
1030 PRINT"INSTRUCTIONS (Y/N)?"
1040 GETA$:X=1-(A$="Y")-2*(A$="N"):ONXGOTO1040,1050,2000
1050 PRINT"[147] LIFE IS A COMPUTER SIMULATION OF"
1060 PRINT"DEATH AND SURVIVAL IN A COMMUNITY."
1070 PRINT"LIFE FORMS ARE REPRESENTED AS CIRCLES"
1080 PRINT"([209]). WITH EACH NEW GENERATION THESE"
1090 PRINT"LIFE FORMS WILL LIVE, DIE OR BE BORN"
1100 PRINT"ACCORDING TO CERTAIN RULES."
1110 PRINT" IF ANY LIFE FORM HAS MORE THAN THREE"
1120 PRINT"NEIGHBORS OR LESS THAN TWO THEN IT WILL"
1130 PRINT"DIE. IF EXACTLY THREE LIFE FORMS"
1140 PRINT"SURROUND AN EMPTY SPACE THEN A LIFE"
1150 PRINT"FORM WILL BE BORN IN THAT SPACE."
1160 PRINT" (PRESS THE SPACE BAR)"
1170 IFPEEK(197)<>60THENGOTO1170
1180 PRINT"[147] IN THE FOLLOWING SITUATIONS YELLOW"
1190 PRINT"CIRCLES WILL NOT SURVIVE TO THE NEXT"
1200 PRINT"GENERATION FOR THE INDICATED REASONS."
1210 PRINT"ARROWS INDICATE WHERE A LIFE FORM WILL"
1220 PRINT"BE BORN."
1230 PRINT" [209]
1240 [153]" (null) (null)
1250 PRINT" [209] [209] [209]
1260 [153]" _TANTANRIGHT$ SYS(null) ^ ^ SYS(null) (null)(null)
1270 PRINT" [158][209][209][158][209] [221] ^ [202][178][203] ^ [209][158][209][209]
1280 [153]" ^ ^ (null) (null)TANTANTAN>TANTAN(null)TANTAN(null) ^
1290 PRINT" [221]^[221] [221] [221] [221] [221]
1300 [153]" (null)MID$(null)TANTAN< (null) (null) (null)
1310 PRINT" [202][178][203] [202][192][192][219][192]LIFE FORMS WILL [221]
1315 [153]" (null) (null) BE BORN HERE (null)
1317 PRINT" [221] [221] [221]
1320 [153]" THESE WILL DIE THIS ONE WILL DIE
1330 PRINT" OF LONELINESS FROM OVERCROWDING
1340 [153]" (PRESS THE SPACE BAR)"
1350 [139][194](197)[179][177]60[167][137]1350
1360 [153]"LOAD CURSOR MOVEMENT IS STANDARD THROUGH"
1370 [153]"THE CONTROL KEYS. PLACE A LIFE FORM"
1380 [153]"BY PRESSING THE RETURN KEY, ERASE WITH"
1390 [153]"THE SPACE BAR. USE THE 'E' KEY TO"
1400 [153]"ERASE THE SCREEN.
1420 PRINT" WHEN ALL CHARACTERS ARE IN POSITION"
1430 PRINT"PRESS THE 'R' KEY TO START AND PRESS"
1440 PRINT"THE RUN/STOP KEY TO RETURN TO THE"
1450 PRINT"EDIT MODE."
1460 PRINT" (PRESS THE SPACE BAR TO BEGIN)"
1470 IFPEEK(197)<>60THEN1470
2000 SYS4409